package com.example.demo.dao;

import com.example.demo.pojo.YYQX;
import org.springframework.stereotype.Controller;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

//模拟数据库
@Controller
public class YYQXDao {
    private static Map<Integer, YYQX> yyqx=null;
    static {
        yyqx=new HashMap<Integer,YYQX>();
        yyqx.put(1,new YYQX(1,"dance"));
        yyqx.put(2,new YYQX(2,"movie"));
        yyqx.put(3,new YYQX(3,"Hulusi"));
        yyqx.put(4,new YYQX(4,"ClaySculpture"));
    }
    //获取所有兴趣
    public Collection<YYQX> getYyqxhobbys(){
        return yyqx.values();
    }
    //通过粉丝确定易烊千玺兴趣爱好
    public YYQX getYyqxhobbysByfansID(Integer fansID){
        return yyqx.get(fansID);
    }
}
